A Study of Type Analysis for Speculative Method Inlining in a JIT Environment

نویسندگان

  • Feng Qian
  • Laurie J. Hendren
چکیده

Method inlining is one of the most important optimizations for JIT compilers in Java virtual machines. In order to increase the number of inlining opportunities, a type analysis can be used to identify monomorphic virtual calls. In a JIT environment, the compiler and type analysis must also handle dynamic class loading properly because class loading can invalidate previous analysis results and invalidate some speculative inlining decisions. To date, a very simple type analysis, class hierarchy analysis (CHA), has been used successfully in JIT compilers for speculative inlining with invalidation techniques as backup. This paper seeks to determine if more powerful dynamic type analyses could further improve inlining opportunities in a JIT compiler. To achieve this goal we developed a general dynamic type analysis framework which we have used for designing and implementing dynamic versions of several well-known static type analyses, including CHA, RTA, XTA and VTA. Surprisingly, the simple dynamic CHA is nearly as good as an ideal type analysis for inlining virtual method calls. There is little room for further improvement. On the other hand, only a reachabilitybased interprocedural type analysis (VTA) is able to capture the majority of monomorphic interface calls. We also found that memory overhead is the biggest issue with dynamic whole-program analyses. To address this problem, we outline the design of a demand-driven interprocedural type analysis for inlining hot interface calls.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Speculative Optimizations without Fear

Just-in-time (JIT) language implementations make heavy use of speculative optimizations, based on assumptions that might become invalid. This requires the implementation to support a bailout mechanism to undo invalidated optimizations. The interaction between assumptions and optimizations is a major source of complexity for JIT implementers: how should optimizations preserve bailout information...

متن کامل

Type-Safe Optimisation of Plugin Architectures

Programmers increasingly implement plugin architectures in type-safe object-oriented languages such as Java. A virtual machine can dynamically load class files containing plugins, and a JIT compiler can do optimisations such as method inlining. Until now, the best known approach to type-safe method inlining in the presence of dynamic class loading is based on Class Hierarchy Analysis. Flow anal...

متن کامل

Method Inlining, Dynamic Class Loading, and Type Soundness

Method inlining is an optimisation that can be invalidated by later class loading. A program analysis based on the current loaded classes might determine that a method call has a unique target, but later class loading could add targets. If a compiler speculatively inlines methods based on current information, then it will have to undo the inlining when later classes invalidate the assumptions. ...

متن کامل

Method Inlining , Dynamic Class Loading , and Type

Method inlining is an optimisation that can be invalidated by later class loading. A program analysis based on the current loaded classes might determine that a method call has a unique target, but later class loading could add targets. If a compiler speculatively inlines methods based on current information, then it will have to undo the inlining when later classes invalidate the assumptions. ...

متن کامل

Towards JIT compilation for IO language

IO [6] is a relatively new pure object-oriented language, providing dynamic features comparable with popular scripting languages like Python or Ruby. IO has simple but flexible syntax, allowing for metaprogramming at the syntax tree level. Some aspects of the syntax, such as operator and assignment reshuffling, make IO source code feel natural. Availability of runtime code modification and simp...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005